package com.project.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.project.bean.BuyOrderBean;

import java.time.LocalDate;

/**
 * 采购订单业务接口
 */
public interface IBuyOrderService {
    /**
     * 添加采购订单
     * @param buyOrder 采购订单
     */
    Integer add(BuyOrderBean buyOrder);

    /**
     * 按采购订单ID查询采购订单明细，需要同时查询采购订单，采购员名称、供应商名称，商品信息
     * @param buyOrderId 采购订单ID
     * @return 采购订单明细
     */
    BuyOrderBean findByOrderId(Integer buyOrderId);

    /**
     * 动态分页查询采购订单
     * @param pageNO 页码
     * @param ventorName 供应商名字
     * @param startDate 起始日期
     * @param endDate 结束日期
     * @return 订单分页对象
     */
    IPage<BuyOrderBean> findByItem(Integer pageNO,String ventorName, LocalDate startDate,LocalDate endDate);
}
